package com.mo.listen;

import com.mo.channel.MyChannel;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.stereotype.Component;

@Component
@EnableBinding(MyChannel.class)
public class MessageListener {

    @StreamListener(MyChannel.input)
    public void input(String msg){
        System.out.println(msg);
    }
}
